#include "LinkedList.h "
#include <iostream>  
#include<string>


using namespace std;  

// Lab 2 using linkedlist


int main()  
{

	Nodelist li;
	string LN;
	string FN;
	int CustNum =1;
	float Balance=1;


	bool bLoop = true;
	while ( bLoop )
	{
		system( "cls" );
			int choice, num;
		cout << "1.) Add dATA." << endl;
		cout << "2.) Display lists" << endl;
		cout << "3.) Sort Customer Number lists" << endl;
		cout << "4.) Remover Top Node" << endl;
		cout << "5.) Sort Customer m_pHead NAme." << endl;
		cout << "6.) Exit." << endl;

	
		cin >> choice;
		system( "cls" );
		switch( choice )
		{
		case 1:
			cout<<"Enter first NAme : ";
			cin>>FN;
			//FN = p;
			cout<<"Enter Last NAme : ";
			cin>>LN;
			cout<<"Enter Customer Number : ";
			cin>>CustNum;
			cout<<"Account Balance: ";
			cin>>Balance;
			li.additem(FN,LN,CustNum,Balance); 
		
	
			break;
		case 2:
		/*	li.display();
			cin.get();
			cin.get();*/
				while ( li.GetTopNode() != NULL )
			{
				cout << li.GetTopNode()->customerNUmber << endl;
				li.RemoveTopNode();

			}
cin.get();
cin.get();

			break;

		case 3://sort
			li.SortCustNum();
			cin.get();
			break;

		case 4:
			
			while ( li.GetTopNode() != NULL )
			{
				cout << li.GetTopNode()->customerNUmber << endl;
				li.RemoveTopNode();

			}

			break;
		case 5:


			break;
		case 6://exit
			bLoop = false;
			break;
		}

	}




	return 0;  
}